package com.sgl.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 页面跳转控制器
 */
@Controller
public class PageController {

	@RequestMapping("{module}/{url}.html")
	public String module(@PathVariable("module") String module, @PathVariable("url") String url){
		return  module + "/" + url;
	}
	
	@RequestMapping("{module}/{sub}/{url}.html")
	public String moduleSub(@PathVariable("module") String module, @PathVariable("sub") String sub, @PathVariable("url") String url){
		return  module + "/"+ sub + "/" + url;
	}

	@RequestMapping(value = {"/", "index.html"})
	public String index(){
		return "index";
	}
}
